package com.example.smartcity_poverty.ui.AllService.Attorneys.adapter

import com.example.smartcity_poverty.App.Companion.url
import com.example.smartcity_poverty.Base.BaseRecyclerAdapter
import com.example.smartcity_poverty.logic.model.Attreneys.AttUserListAllModel
import com.example.smartcity_poverty.logic.util.Util.glide
import kotlinx.android.synthetic.main.re_att_show_list_comment.*

/**
 *  created by ikun
 *  ANDROID STUDIO - version 4.0
 *  email: jinkunwei41@gmail.com
 * --------------------------------
 *  律师详情页评论列表适配器
 **/
class AttUserListAdapter (
    val list: MutableList<AttUserListAllModel.RowsBean>,
    layoutId: Int
) : BaseRecyclerAdapter<AttUserListAllModel.RowsBean>(list, layoutId){
    override fun setData(
        view: BaseViewHolder.ViewFind,
        data: AttUserListAllModel.RowsBean,
        position: Int,
        holder: BaseViewHolder
    ) {
        // 填充数据
        val d = list[position]
        val fv = holder.viewFind
        // val con = holder.viewFind.view?.context

        glide(url + d.fromUserAvatar, fv.attUserImageView)
        fv.attUserName.text = d.fromUserName
        fv.attUserContent.text = d.evaluateContent
        fv.attUserTime.text = d.createTime
        fv.attUserSize.text = d.likeCount.toString()
    }

}